#include "data_global.h"
#include "sem.h"

prodcons_t init;
int main(int argc, const char *argv[])
{
	void *retval;
	pthread_t transfer;
   //	pthread_t analysis;
	pthread_t refresh;
	
	init(&init);
	init_shm();
	init_sem(semid, 0, 1);
	pthread_create(&transfer, NULL, handler_transfer, 0);
		
	//pthread_create(&analysis, NULL, handler_analysis, 0);
	
	pthread_create(&refresh, NULL, handler_refresh, 0);
	
	pthread_join(transfer, &retval);
	//pthread_join(analysis, &retval);
	pthread_join(refresh, &retval);
	return 0;
}
